package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.enums.AccessLinkEnum;
import lombok.Getter;

/**
 * 钉钉的页面路径枚举类：智能助手使用
 *
 * @author hongxiao
 * @date 2020-01-03 16:40
 * @since v4.9.0
 * @version v4.9.0
 */
@Getter
public enum AiAssistantDingtalkPageUrlEnum {

    /**
     * 首页
     */
    INDEX("enum.aiAssistantDingtalkPageUrl.name.index", "?corpid=%s"),

    /**
     * 列表
     * 客户列表：添加defaultFormId参数，表示选择的表单id 2019-12-19 by hongxiao
     */
    CUSTOMER_LIST("enum.aiAssistantDingtalkPageUrl.name.customer_list", "/list/customer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=100&subBusinessType=101&dataIds=%s&defaultFormId=%s"),


    CONTACT_LIST("enum.aiAssistantDingtalkPageUrl.name.contact_list", "/list/contact?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=401&subBusinessType=401&dataIds=%s"),


    OPPORTUNITY_LIST("enum.aiAssistantDingtalkPageUrl.name.opportunity_list", "/list/opportunity?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=301&subBusinessType=302&dataIds=%s"),


    CONTRACT_LIST("enum.aiAssistantDingtalkPageUrl.name.contract_list", "/list/contract?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=201&subBusinessType=201&dataIds=%s&defaultFormId=%s"),


    PAYMENT_PLAN_LIST("enum.aiAssistantDingtalkPageUrl.name.payment_plan_list", "/list/payment?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=701&subBusinessType=701&dataIds=%s"),


    INVOICE_LIST("enum.aiAssistantDingtalkPageUrl.name.invoice_list", "/list/invoice?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=901&subBusinessType=901&dataIds=%s"),

    PURCHASE_INVOICE_LIST("enum.aiAssistantDingtalkPageUrl.name.invoice_list", "/fund/invoicePay?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=901&subBusinessType=901&dataIds=%s"),


    WORK_REPORT_LIST("enum.aiAssistantDingtalkPageUrl.name.work_report_list", "/list/work-report?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2101&subBusinessType=2101"),


    WORK_ORDER_LIST("enum.aiAssistantDingtalkPageUrl.name.work_order_list", "/workOrder/index?appId=%s&subBusinessType=2301&saasMark=1"),


    WORK_ORDER_WAIT_ROB_LIST("enum.aiAssistantDingtalkPageUrl.name.work_order_wait_rob_list", "/workOrder/work-order-wait?filterType=workOrderWaitList&appId=%s&subBusinessType=2305&saasMark=1"),


    SUPPLIER_LIST("enum.aiAssistantDingtalkPageUrl.name.supplier_list", "/list-jxc/supplier?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1001&subBusinessType=1001&dataIds=%s"),


    SUPPLIER_CONTACT_LIST("enum.aiAssistantDingtalkPageUrl.name.supplier_contact_list", "/list-jxc/supplier-contact?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1002&subBusinessType=1002&dataIds=%s"),


    PURCHASE_LIST("enum.aiAssistantDingtalkPageUrl.name.purchase_list", "/list-jxc/purchase?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1101&subBusinessType=1101&dataIds=%s"),


    PURCHASE_RETURN_LIST("enum.aiAssistantDingtalkPageUrl.name.purchase_return_list", "/list-jxc/returned-purchase?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1201&subBusinessType=1201&dataIds=%s"),


    BOM_LIST("enum.aiAssistantDingtalkPageUrl.name.bom_list", "/list-jxc/bom-bill?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2601&subBusinessType=2601&dataIds=%s"),


    PRODUCTION_ORDER_LIST("enum.aiAssistantDingtalkPageUrl.name.production_order_list", "/list-jxc/production-order?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=2801&subBusinessType=2801&dataIds=%s"),


    PAY_PLAN_LIST("enum.aiAssistantDingtalkPageUrl.name.pay_plan_list", AccessLinkEnum.PAY_PLAN.getMobileUrl() + "?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=801&subBusinessType=801&dataIds=%s"),


    ASSEMBLE_LIST("enum.aiAssistantDingtalkPageUrl.name.assemble_list", "/list-jxc/assemble?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1301&subBusinessType=1301&dataIds=%s"),


    OUTSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.outstock_list", "/list-jxc/outstock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1501&subBusinessType=1501&dataIds=%s"),

    NEW_OUTSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.instock_list", "/list-jxc/refund-instock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=%s&subBusinessType=%s&dataIds=%s"),

    INSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.instock_list", "/list-jxc/instock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1401&subBusinessType=1401&dataIds=%s"),

    NEW_INSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.instock_list", "/list-jxc/refund-instock?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=%s&subBusinessType=%s&dataIds=%s"),


    IINVENTORY_LIST("enum.aiAssistantDingtalkPageUrl.name.iinventory_list", "/list-jxc/inventory?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1701&subBusinessType=1701&dataIds=%s"),


    TRANSFER_LIST("enum.aiAssistantDingtalkPageUrl.name.transfer_list", "/list-jxc/transfer?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1601&subBusinessType=1601&dataIds=%s"),


    PRODUCT_LIST("enum.aiAssistantDingtalkPageUrl.name.product_list", "/list-jxc/product?appId=%s&menuId=%s&subBusinessType=2401&saasMark=1&dataIds=%s"),


    STOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.stock_list", ""),


    WAREHOUSE_LIST("enum.aiAssistantDingtalkPageUrl.name.warehouse_list", "/list-jxc/warehouse?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=1801&subBusinessType=1801"),


    REFUND_LIST("enum.aiAssistantDingtalkPageUrl.name.refund_list", "/list/refund-contract?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=202&dataIds=%s"),


    QUOTATION_LIST("enum.aiAssistantDingtalkPageUrl.name.quotation_list", "/list/quotation?appId=%s&menuId=%s&formId=%s&businessType=4700&subBusinessType=4700&saasMark=1&dataIds=%s"),


    BOMBILL_LIST("enum.aiAssistantDingtalkPageUrl.name.bombill_list", "/list-jxc/bom-bill?appId=%s&menuId=%s&formId=%s&businessType=2601&subBusinessType=2601&saasMark=1&dataIds=%s"),


    PRODUCT_STOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.product_stock_list", "/list-jxc/product-stock?subBusinessType=1901&appId=%s&saasMark=1&businessType=2401&menuId=%s&dataIds=%s&defaultGroup=1&defaultGroupCode=%s"),


    WAIT_PURCHASE_LIST("enum.aiAssistantDingtalkPageUrl.name.wait_purchase_list", "/list-jxc/wait-purchase?subBusinessType=1102&appId=%s&menuId=%s&saasMark=1&filterType=waitPurchase&dataIds=%s&defaultFormId=%s"),


    WAIT_PRODUCE_LIST("enum.aiAssistantDingtalkPageUrl.name.wait_produce_list", "/list-jxc/wait-produce?subBusinessType=2803&appId=%s&menuId=%s&saasMark=1&filterType=waitProduce&dataIds=%s&defaultFormId=%s"),


    WAIT_OUTSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.wait_outstock_list", "/list-jxc/wait-outstock?subBusinessType=1503&appId=%s&menuId=%s&saasMark=1&filterType=waitOutstock&dataIds=%s&defaultFormId=%s"),


    WAIT_INTSTOCK_LIST("enum.aiAssistantDingtalkPageUrl.name.wait_intstock_list", "/list-jxc/wait-instock?subBusinessType=1403&appId=%s&menuId=%s&saasMark=1&filterType=waitInstock&dataIds=%s&defaultFormId=%s"),

    MARKET_ACTIVITY_LIST("enum.aiAssistantDingtalkPageUrl.name.market_activity_list", "/list-market/market-activity?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=8100&subBusinessType=8100&dataIds=%s&defaultFormId=%s"),

    CLUE_LIST("enum.aiAssistantDingtalkPageUrl.name.clue_list", "/list-market/sales-leads?appId=%s&menuId=%s&formId=%s&saasMark=1&businessType=8000&subBusinessType=8001&dataIds=%s&defaultFormId=%s"),

    WORK_ORDER_V2_LIST("enum.aiAssistantDingtalkPageUrl.name.clue_list", "/work-order-v2/all-mobile?appId=%s&menuId=%s&formId=%s&saasMark=%s&businessType=%s&subBusinessType=%s&dataIds=%s&defaultFormId=%s"),

    RECEIPT_ORDER_LIST("enum.aiAssistantDingtalkPageUrl.name.clue_list", "/work-order-v2/receiptOrder-mobile?appId=%s&menuId=%s&formId=%s&saasMark=%s&businessType=%s&subBusinessType=%s&dataIds=%s&defaultFormId=%s"),

    SERVICE_PROJECT_LIST("enum.aiAssistantDingtalkPageUrl.name.clue_list", "/work-order-v2/serviceProject-mobile?appId=%s&menuId=%s&formId=%s&saasMark=%s&businessType=%s&subBusinessType=%s&dataIds=%s&defaultFormId=%s"),


    PAAS_LIST("enum.aiAssistantDingtalkPageUrl.name.paas_list", "/application/list?subBusinessType=404&saasMark=2&appId=%s&menuId=%s&dataIds=%s&name=%s"),

    ;

    /**
     * 中文描述
     */
    private final String name;
    /**
     * 路径URL
     */
    private final String url;


    AiAssistantDingtalkPageUrlEnum(String name, String url) {
        this.name = name;
        this.url = url;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

}
